home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
cnet
/
ffish_sim10b.lha
/
lakeeditor1.0a
< prev
next >
Wrap
Text File
|
1993-02-21
|
8KB
|
319 lines
/*
Freshwater Fishing Simulator
Lake Creator V1.0
By Matrix
Genesis BBS 804-887-3584
19200 - 250 Megs - Wares
FOR USE ON A REGISTERED CNET BBS ONLY
-------------------------------------------------
This is the editor I created and used to make
the lakes for my game. It's pretty bare bones but
I wanted you to be able to make some lakes of your
own while you wait for a revision. This is my
first arexx project so have some heart.
*/
/*Housekeeping **************************************/
options results
signal on error
signal on syntax
signal on ioerr
/*Shortcuts *****************************************/
tr = Transmit
ss = Sendstring
sf = Sendfile
path = "pfiles:fishing/lakedata/"
path1= "pfiles:fishing/lakemaps/"
path2= "pfiles:fishing/files/"
call DATA
/*Start *********************************************/
START:
tr"f1n2 FRESHWATER SIMULATOR FILE CREATOR"
tr"n2 1. Create Lake Maps and Data"
tr" 2. RESET Tournament and Largest Fish Caught data files"
tr" 3. Quit"
ss"n1 What do you want to do? >"
getchar;ans=result
if ans=1 then signal CREATE
if ans=2 then signal RESET
if ans=3 then signal QUIT
signal START
CREATE:
ss"f1n2"
ss "What shall the Lake/River be Named? :"
receive; lakename = result
if lakename = "" then signal CREATE
call FISH
call MAPPING
signal SAVE
exit
MAPPING:
ss"f1n2 Mapping The Lake...w1f1";r="0";extend="";s="0"
do y = 3 to 17
row.y = ""
cmap.y = ""
do z = 1 to 41
ss "f0n"||s||extend||cmap.y||"q1"
if z = 41 then iterate z
call ENTER
if ans = "L" then do;
row.y=row.y||"000"
cmap.y = cmap.y||map.0
iterate z;end
if ans = "D" then do;
launch=1
row.y=row.y||"770"
cmap.y = cmap.y||map.7
posX=z;posY=y
iterate z;end
if ans = "A" then signal QUIT
if ans = "W" then do;
call DEPTH;call TYPE;call HOT;end
row.y = row.y||type||depth||hot
end
if y <9 then do;s=s+1;end
if y >=9 then do;
r=r+1;extend = "n"||r;end
end
return
ENTER:
tr "f0n5"
tr ">9>9>9>9>9Lake: "||lakename
tr "n1>9>9>9>9>9"||map.0||"q1 - Land"
tr ">9>9>9>9>9"||map.1||"q1 - 0 - 10ft"
tr ">9>9>9>9>9"||map.3||"q1 - 10 - 20ft"
tr ">9>9>9>9>9"||map.5||"q1 - 20 - 30ft"
tr ">9>9>9>9>9"||map.7||"q1 - Dock"
yyy=y-2
tr "f0n9n6 Coordinate: "||yyy||","||" h3"||z
tr " "
tr " [L]and "
tr " [W]ater "
tr " [D]ock "
tr " [A]bort "
ss " Command?> "
ss " "
ss " n1^2>9>1"
getchar
ans = upper(result)
if ans = "L" then return
if ans = "W" then return
if ans = "A" then return
if ans = "D" then do;
if launch ~=1 then return
Tr "0HOnly ONE start0Hlocation allowed"
end
signal ENTER
return
DEPTH:
ss"f0n9n6"
tr "Depth: h9h4"
tr " 1. 5ft 4. 20ft"
tr " 2. 10ft 5. 25ft"
tr " 3. 15ft 6. 30ft"
tr " "
tr " "
ss "Enter #1-6 Indicating Depth >"
getchar
ans = upper(result)
if ans<1 | ans>6 then signal DEPTH
if ans = 1 then cmap.y = cmap.y||map.1
if ans = 2 then cmap.y = cmap.y||map.2
if ans = 3 then cmap.y = cmap.y||map.3
if ans = 4 then cmap.y = cmap.y||map.4
if ans = 5 then cmap.y = cmap.y||map.5
if ans = 6 then cmap.y = cmap.y||map.6
depth = ans
return
TYPE:
type="0"
call SURFACE
call BOTTOM
return
SURFACE:
ss "f0n9n6"
tr "Surface: "
tr " 1. Open Water "
tr " 2. Lily Pads "
tr " 3. Weeds "
tr " "
tr " "
ss "Enter a Number Indicating Surface Feature>"
getchar
ans = upper(result)
if ans >3 | ans <1 then signal SURFACE
if ans = "2" & depth = 1 then do;
type = "5"
return;end
if ans = "2" & depth >1 then do;
tr "n1c1Lily Pads Cannot Grow At Depth Selectedq1"
signal SURFACE;end
if ans = "3" & depth = 1 then do;
type = "3"
return;end
if ans = "3" & depth >1 then do;
tr "n1c1The weeds don't grow that high! h9q1"
signal SURFACE;end
return
BOTTOM:
if type = "3" | type = "5" | type = "6" then return
ss "f0n9n6"
tr "Bottom: "
tr " 1. Rocky "
tr " 2. Sandy "
tr " 3. Weeds "
tr " 4. Logs "
tr " 5. Sunken Vessel "
tr " "
ss "Enter a Number Indicating Bottom Feature> h3"
getchar
ans = upper(result)
if ans <1 | ans >5 then signal BOTTOM
if ans = "3" then do;
type = "7";return;end
if ans = "5" then do;
type = "8";return;end
type = ans
return
HOT:
ss"f0n9n9n3"
ss "Are There Any Fish in This Area? (Y/N)> h3"
getchar
ans = upper(result)
if ans = "Y" then do;
hot = "1";return;end
if ans = "N" then do;
hot = "0";return;end
signal HOT
return
FISH:
ss "f1"
sf path2||"fish.list"
Do x = 1 to 5
ss "n1Enter Fish Number "||x||". > h3"
receive;ans = upper(result)
if ans <1 | ans >16 then signal FISH
loop = ans
code.x=ans
fisha.x = fish.loop
ss"^2"
end
tr "f1n2Fish Selected for: "||lakename||"n2"
do x = 1 to 5
tr " "||x||"."||" "||fisha.x
end
ss "n1 Okay? [No] >"
getchar
ans = upper(result)
if ans = "Y" then do;
do x = 1 to 4
fishlist=fishlist||code.x||"+";end
fishlist=fishlist||code.5
return;end
signal FISH
return
DATA:
fish.1="Largemouth Bass";fish.2="Smallmouth Bass";fish.3="Striped Bass"
fish.4="Lake Trout";fish.5="Brown Trout";fish.6="Rainbow Trout"
fish.7="King Salmon";fish.8="Coho Salmon";fish.9="Channel Catfish"
fish.10="Muskellunge";fish.11="Walleye";fish.12="Northern Pike"
fish.13="White Bass";fish.14="Bluegill";fish.15="Crappie";fish.16="Yellow Perch"
map.0="z2 ";map.1="z7 ";map.2="z7 ";map.3="z6 ";map.4="z6 ";map.5="z4 "
map.6="z4 ";map.7="z1 "
launch=0;fishlist=""
blank="000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
row.1=blank;row.2=blank;row.18=blank;row.19=blank
return
SAVE:
do y=3 to 17
row.y="000000000000"||row.y||"000000000000"
end
ss "f1n2Enter FILENAME ONLY >"
receive;name=upper(result)
ss "n1Saving..."
call Open(lake,path||name,'W')
call writeln lake , lakename;ss "."
call writeln lake , fishlist
call writeln lake , posY
call writeln lake , posX
do y = 1 to 19
call writeln lake , row.y
end
call close (lake)
call open(map,path1||name,'W')
do y = 3 to 17
call writeln map , cmap.y
ss"."
end
call close (map)
tr "f1 Data File is in LakeData Dir"
tr " Map File is in LakeMaps Dirn1"
ss "n1Do You Wish To Create Another? [No]>"
getchar
ans=result
if ans = "Y" then signal CREATE
signal quit
RESET:
bufferflush
ss "n1Are you Sure? >"
getchar;ans=upper(result)
if ans="N" then signal START
if ans="Y" then do;
tr "f1Resetting Data Files...n1"
ss "Tournament Data..."
code50="No One"
code51="0"
signal off error
call open(tourny,path2||"fish.tourny","W")
do i = 1 to 9
writeln(tourny,code50)
writeln(tourny,code51)
end
signal on error
call close(tourny)
ss "Donen1"
code99="0+0+Freshwater Fishing+Simulator"
ss "Largest Fish Data..."
signal off error
call open(big,path2||"fish.biggest","W")
do i = 1 to 17
writeln(big,code99)
end
signal on error
call close(big)
ss "Donen1w1"
signal START:
ERROR:
tr "Error in line"SIGL
exit
SYNTAX:
tr "Syntax Error in Line"SIGL
exit
IOERR:
tr "IO error in Line"SIGL
exit
QUIT:
exit